package com.os.sys.pojo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

//menu_id
//menu_name
//menu_addr
//menu_parent
//menu_code
//menu_order
//menu_level
//menu_isfin
public class SysMenu  implements Serializable{
	private static final long serialVersionUID = 1L; 
	private int menu_id;
	private String menu_name;
	private String menu_addr;
	private int menu_parent;
	private String menu_code;
	private String menu_order;
	private String menu_level;
	private String menu_isfin;
	private int menu_perm = 1;
	private String menu_img;
	private String oper;
	private String menu_frm;
	private int menu_enable;
	
	
	public String getOper() {
		return oper;
	}

	public void setOper(String oper) {
		this.oper = oper;
	}

	public String getMenu_addr() {
		return menu_addr;
	}

	public void setMenu_addr(String menu_addr) {
		this.menu_addr = menu_addr;
	}

	public String getMenu_code() {
		return menu_code;
	}

	public void setMenu_code(String menu_code) {
		this.menu_code = menu_code;
	}

	public int getMenu_id() {
		return menu_id;
	}

	public void setMenu_id(int menu_id) {
		this.menu_id = menu_id;
	}

	public String getMenu_isfin() {
		return menu_isfin;
	}

	public void setMenu_isfin(String menu_isfin) {
		this.menu_isfin = menu_isfin;
	}

	public String getMenu_level() {
		return menu_level;
	}

	public void setMenu_level(String menu_level) {
		this.menu_level = menu_level;
	}

	public String getMenu_name() {
		return menu_name;
	}

	public void setMenu_name(String menu_name) {
		this.menu_name = menu_name;
	}

	public String getMenu_order() {
		return menu_order;
	}

	public void setMenu_order(String menu_order) {
		this.menu_order = menu_order;
	}

	public int getMenu_parent() {
		return menu_parent;
	}

	public void setMenu_parent(int menu_parent) {
		this.menu_parent = menu_parent;
	}
	
	public int getMenu_perm() {
		return menu_perm;
	}

	public void setMenu_perm(int menu_perm) {
		this.menu_perm = menu_perm;
	}
	
	

	public String getMenu_img() {
		return menu_img==null?"":menu_img;
	}
	
	public String getMenu_img_full(String appUri) {
		String menu_img1 = getMenu_img();
		if(menu_img1.length()==0){
			return "";
		}
		if(menu_img1.indexOf("/")<0){
			return appUri+"/kendo/images/mico/"+menu_img1 ;
		}
		return appUri+menu_img1;
	}

	public void setMenu_img(String menu_img) {
		this.menu_img = menu_img;
	}

	public String getMenu_frm() {
		return menu_frm;
	}

	public void setMenu_frm(String menu_frm) {
		this.menu_frm = menu_frm;
	}

	public String getPrintStr(){
		String Str = "";
//		Str = "[(menu_id,"+menu_id+"),"+ 
//		             "(menu_name,"+menu_name+"),"+ 
//		             "(menu_addr,"+menu_addr+")" +
//		             "(menu_parent,"+menu_parent+")" +
//		             "(menu_code,"+menu_code+")" +
//		             "(menu_order,"+menu_order+")" +
//		             "(menu_level,"+menu_level+")" +
//		             "(menu_isfin,"+menu_isfin+")" +
//		             "(menu_perm,"+menu_perm+")" +
//		             "(menu_img,"+menu_img+")" +
//		             "(menu_frm,"+menu_frm+")" +
//		             		"]";
		return Str;
	}
    
	public int getMenu_enable() {
		return menu_enable;
	}

	public void setMenu_enable(int menu_enable) {
		this.menu_enable = menu_enable;
	}

	public void printMe(){
		System.out.print(this.getPrintStr() );
		
	}
	
	//导出菜单时使用20171024
	private List<SysMenu> children = new ArrayList();


	public List<SysMenu> getChildren() {
		return children;
	}

	public void setChildren(List<SysMenu> children) {
		this.children = children;
	}

	@Override
	public String toString() {
		return "SysMenu{" +
				"menu_id=" + menu_id +
				", menu_name='" + menu_name + '\'' +
				", menu_addr='" + menu_addr + '\'' +
				", menu_parent=" + menu_parent +
				", menu_code='" + menu_code + '\'' +
				", menu_order='" + menu_order + '\'' +
				", menu_level='" + menu_level + '\'' +
				", menu_isfin='" + menu_isfin + '\'' +
				", menu_perm=" + menu_perm +
				", menu_img='" + menu_img + '\'' +
				", oper='" + oper + '\'' +
				", menu_frm='" + menu_frm + '\'' +
				", menu_enable=" + menu_enable +
				", children=" + children +
				'}';
	}
}
